//
//  TimingCode.hpp
//  learnC++
//
//  Created by apple on 2018/6/4.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#ifndef TimingCode_hpp
#define TimingCode_hpp

#include <stdio.h>
#include <iostream>
#include <chrono>
//chrono [`krɑnә]

class Mytime {
    //稳定的钟表
    using clock_t = std::chrono::high_resolution_clock;
    using second_t = std::chrono::duration<double,std::ratio<1>>;
    
    std::chrono::time_point<std::chrono::high_resolution_clock> m_beg;

public:
    
    Mytime();
    
    void reset();
    
    double elapsed()const;
};


#endif /* TimingCode_hpp */
